package com.huawei.hms.videoeditor;

import android.content.Context;

import com.huawei.agconnect.config.AGConnectServicesConfig;
import com.huawei.hms.videoeditor.sdk.MediaApplication;
import com.huawei.hms.videoeditor.ui.mediaeditor.menu.MenuConfig;

import java.util.UUID;

/**
 * Author：daizhongbin on 2022/10/27
 * Email：1027154338@qq.com
 * Desc:
 */
public class HmsVeModule {

    public static void init(Context context) {
        VideoEditorApplication.getInstance().setContext(context.getApplicationContext());

        AGConnectServicesConfig config = AGConnectServicesConfig.fromContext(context);
        MediaApplication.getInstance().setApiKey(config.getString("client/api_key"));

        UUID uuid = UUID.randomUUID();
        MediaApplication.getInstance().setLicenseId(uuid.toString());

        MenuConfig.getInstance().initMenuConfig(context);
    }

}
